1 00:00:01,770 --> 00:00:06,430 ‫Welcome to the main lecture, like I promised in the previous lecture. 2 00:00:06,810 --> 00:00:10,210 ‫Here we are going to be adding an item into our database table. 3 00:00:10,410 --> 00:00:14,400 ‫But what we're going to do in this one is slightly more different, is slightly different, because 4 00:00:14,400 --> 00:00:22,860 ‫we are going to be adding an item using variables that have been passed from another application. 5 00:00:22,860 --> 00:00:26,040 ‫Could be a mobile app or another front end application. 6 00:00:26,070 --> 00:00:27,710 ‫You are using with ERP next. 7 00:00:28,080 --> 00:00:33,150 ‫So you're going to be expecting these parameters here and then we're going to be inserting them into 8 00:00:33,150 --> 00:00:33,800 ‫the database. 9 00:00:33,990 --> 00:00:37,310 ‫So this could come from any application, basically. 10 00:00:37,680 --> 00:00:39,330 ‫So what do you want to be doing here? 11 00:00:39,570 --> 00:00:46,830 ‫We are going to be having either let me call this the code so we won't be expecting code from the front 12 00:00:46,830 --> 00:00:47,100 ‫end. 13 00:00:47,400 --> 00:00:49,530 ‫We're going to be expecting the name from the front end. 14 00:00:49,850 --> 00:00:52,980 ‫We're going to be expecting the group from the front end. 15 00:00:53,190 --> 00:00:55,470 ‫And we are going to expect you from the front end. 16 00:00:55,530 --> 00:01:01,020 ‫Now, when we come here, instead of hard coding things here, we will supply code and then we are going 17 00:01:01,020 --> 00:01:06,540 ‫to supply here the name and then we are going to apply here, the group. 18 00:01:06,540 --> 00:01:11,490 ‫And this makes it dynamic and then it would supply the unit of measure for the unit. 19 00:01:11,520 --> 00:01:11,960 ‫All right. 20 00:01:12,750 --> 00:01:15,180 ‫So this is going to come from the front end. 21 00:01:15,200 --> 00:01:19,330 ‫These variables are not known here now because we are not sending anything from here. 22 00:01:19,650 --> 00:01:27,600 ‫So if we try to send this thing now, what are going to get this is a message that is a message that 23 00:01:29,040 --> 00:01:34,530 ‫they are missing arguments within our one method. 24 00:01:34,650 --> 00:01:40,650 ‫So what we want to do is go to your body and pass them as our format is. 25 00:01:40,650 --> 00:01:43,470 ‫I'm going to be using that can composite us, Jason, if you want. 26 00:01:43,950 --> 00:01:48,250 ‫So just get whatever this is, it's missing. 27 00:01:48,270 --> 00:01:49,860 ‫So this is the code. 28 00:01:49,860 --> 00:01:52,820 ‫But this one was there as the key. 29 00:01:53,010 --> 00:01:54,480 ‫We have the name. 30 00:01:55,140 --> 00:02:00,360 ‫We have the group, and finally we have the unit of measure. 31 00:02:00,570 --> 00:02:00,980 ‫Right. 32 00:02:01,380 --> 00:02:06,510 ‫So this one I can see this one is the unit group is product. 33 00:02:06,510 --> 00:02:11,940 ‫Remember that as we added wire services and then I can call this one, this is easy. 34 00:02:12,240 --> 00:02:17,180 ‫And then here we have item number of that test. 35 00:02:18,210 --> 00:02:22,010 ‫I was like, why are we calling them test items or what are we calling them? 36 00:02:22,030 --> 00:02:24,510 ‫So here you have second item. 37 00:02:24,550 --> 00:02:29,730 ‫So let's call them let's call this one third API item. 38 00:02:29,940 --> 00:02:30,280 ‫OK. 39 00:02:32,430 --> 00:02:34,200 ‫Remember, this is just for the purpose of testing. 40 00:02:34,200 --> 00:02:39,930 ‫If you are running this on a mobile app, you're going to be passing these ones from that particular 41 00:02:39,930 --> 00:02:40,350 ‫app. 42 00:02:40,590 --> 00:02:48,690 ‫So if I send this request now, what I'm going to get now, let me see what it is seeing is a accomplished 43 00:02:48,690 --> 00:02:51,570 ‫that cannot get product is not a product. 44 00:02:51,780 --> 00:02:54,750 ‫I think it is products, products. 45 00:02:54,750 --> 00:02:57,870 ‫They send it again and we get back our data. 46 00:02:57,900 --> 00:03:03,420 ‫So what this means is that it has inserted and we can confirm that by going back here and reloading. 47 00:03:03,420 --> 00:03:08,430 ‫And yes, we have that debate them and everything has been inserted again, really come back to a database 48 00:03:08,430 --> 00:03:09,120 ‫and reload. 49 00:03:09,540 --> 00:03:12,900 ‫We have this and he has been inside it. 50 00:03:12,910 --> 00:03:17,070 ‫So what we have done here, we have expected this as parameters. 51 00:03:17,070 --> 00:03:19,040 ‫Of course, we can use QR documents here. 52 00:03:19,680 --> 00:03:21,620 ‫I just want to keep this thing very simple for you. 53 00:03:21,630 --> 00:03:22,980 ‫So are you going to get started quickly? 54 00:03:23,280 --> 00:03:30,170 ‫So put past them as expected parameters and then you are going to use these ones to insult them here. 55 00:03:30,180 --> 00:03:33,480 ‫So now with this one, I can pass any kind of arguments here. 56 00:03:33,480 --> 00:03:36,150 ‫I can make them dynamic again, pass anything here. 57 00:03:36,330 --> 00:03:40,740 ‫And it is going to be when I sent these to the database. 58 00:03:41,130 --> 00:03:45,690 ‫Thank you so much and see you in our ten, the lecture.